package com.bluedot.www.core.service;

import com.bluedot.www.core.pojo.DTO.SysInfo;
import com.bluedot.www.core.utils.SysInfoUtil;
import com.bluedot.www.framework.mvc.annotation.MyService;

/**
 * @author GUOZHIPENG
 * @version 1.0
 * @date 2021/8/30 14:33
 */
@MyService
public class SystemInfoService {
    public static Object execute(String methodName, Object[] param) {
        SystemInfoService systemInfoService = new SystemInfoService();
        Object result = null;
        switch (methodName) {
            case "getInfo":
                result = systemInfoService.getInfo();
                break;
            default:
                throw new RuntimeException("Method NOT FOUND, method name: " + methodName);
        }
        return result;
    }

    private SysInfo getInfo() {
        return SysInfoUtil.getInfo();
    }
}
